﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace Web
{
    public partial class index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.IsPostBack && this.FileUpload1.HasFile)
            {
                List<HttpPostedFile> lst = this.FileUpload1.PostedFiles.ToList();
                foreach (HttpPostedFile file in lst)
                {
                    string clientFilename = Path.GetFileName(file.FileName);

                    string serverfilename = Request.PhysicalApplicationPath + "\\uploadfiles\\" + clientFilename;
                    this.FileUpload1.SaveAs(serverfilename);
                }
            }
        }
    }
}